<script>
  init({
    title: 'The Animate',
    desc: 'Use <code>animate</code> to define the animate of open or close the dropdown.',
    links: ['multiple-select.min.css'],
    scripts: ['multiple-select.min.js']
  })
</script>

<style>
select {
  width: 100%;
}
</style>

<div>
  <div class="mb-3 row">
    <label class="col-sm-2">
      Animate
    </label>

    <div class="col-sm-10">
      <div class="radio">
        <label>
          <input type="radio" name="animate" value="undefined" checked>
          <code>undefined</code>
        </label>
      </div>
      <div class="radio">
        <label>
          <input type="radio" name="animate" value="fade">
          <code>'fade'</code>
        </label>
      </div>
      <div class="radio">
        <label>
          <input type="radio" name="animate" value="slide">
          <code>'slide'</code>
        </label>
      </div>
    </div>
  </div>

  <div class="mb-3 row">
    <label class="col-sm-2">
      Select
    </label>

    <div class="col-sm-10">
      <select multiple="multiple">
        <option value="1">January</option>
        <option value="2">February</option>
        <option value="3">March</option>
        <option value="4">April</option>
        <option value="5">May</option>
        <option value="6">June</option>
        <option value="7">July</option>
        <option value="8">August</option>
        <option value="9">September</option>
        <option value="10">October</option>
        <option value="11">November</option>
        <option value="12">December</option>
      </select>
    </div>
  </div>
</div>

<script>
  function mounted() {
    $('select').multipleSelect()

    $('[name="animate"]').click(function () {
      $('select').multipleSelect('destroy').multipleSelect({
        animate: $(this).val()
      })
    })
  }
</script>
